package com.medusa.aps.business.modules.basic.mp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.medusa.aps.business.model.pagination.Page;
import com.medusa.aps.business.model.planingscheduing.MaterialBom;
import com.medusa.aps.business.modules.basic.model.input.MaterialParam;
import com.medusa.aps.business.modules.basic.mp.entity.Material;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物料数据库访问层
 *
 * @author yuxh
 * @since 2023-08-14 17:37:47
 */
public interface MaterialMapper extends BaseMapper<Material> {

    /**
     * 查询物料列表
     *
     * @param materialParam 物料查询条件
     * @return 物料列表
     */
    Page<Material> selectAll(@Param("materialParam") MaterialParam materialParam);

    List<MaterialBom> getMaterialByMaterialCode(@Param("materialId") Long materialId);

}

